package org.nextcore.entity;

import java.io.Serializable;

import lombok.Data;

@Data
public class Emp implements Serializable {

    private static final long serialVersionUID = 1L;

    private int eid;
    private String name;
    private String email;

    public Emp() {
        // 默认构造函数
    }

    public Emp(int eid) {
        this.eid = eid;
    }

    public Emp(int eid, String name, String email) {
        this.eid = eid;
        this.name = name;
        this.email = email;
    }

    @Override
    public String toString() {
        return "Emp{"
                + "eid=" + eid
                + ", name='" + name + '\''
                + ", email='" + email + '\''
                + '}';

    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Emp emp = (Emp) o;
        return eid == emp.eid
                && name.equals(emp.name)
                && email.equals(emp.email);
    }

    @Override
    public int hashCode() {
        int result = Integer.hashCode(eid);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        return result;
    }
}
